package com.ljm.sys.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
    * 系统菜单
    * </p>
 *
 * @author ming
 * @since 2019-03-28
 */

@ApiModel(value="SysAuthResourceDto对象", description="系统菜单")

public class SysAuthResourceDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "版本号")
    private Long version;

    @ApiModelProperty(value = "创建人")
    private String creater;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    private String editor;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime editTime;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "是否删除0否1是（用于逻辑删除）")
    private Integer isDelete;

    @ApiModelProperty(value = "权限编码")
    private String permissionCode;

    @ApiModelProperty(value = "菜单链接")
    private String path;

    @ApiModelProperty(value = "组件")
    private String component;

    @ApiModelProperty(value = "重定向")
    private String redirect;

    @ApiModelProperty(value = "是否隐藏")
    private String hidden;

    @ApiModelProperty(value = "一直显示根路由")
    private String alwaysShow;

    @ApiModelProperty(value = "资源标题")
    private String title;

    @ApiModelProperty(value = "组件名称")
    private String name;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "不会被 <keep-alive> 缓存")
    private String noCache;

    @ApiModelProperty(value = "如果设置为false，则不会在breadcrumb面包屑中显示")
    private String breadcrumb;

    @ApiModelProperty(value = "url")
    private String url;

    @ApiModelProperty(value = "菜单序号")
    private Integer sort;

    @ApiModelProperty(value = "类型")
    private String resourceType;

    @ApiModelProperty(value = "父id")
    private Long parentId;

    @ApiModelProperty(value = "层级全称")
    private String fullName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "机构id")
    private String orgId;

    @ApiModelProperty(value = "是否有子资源")
    private boolean hasChildren;

    @ApiModelProperty(value = "是否是叶子")
    private Integer isLeaf;

    private boolean booleanHidden;

    private boolean booleanAlwaysShow;

    private boolean  booleanNoCache;

    private boolean booleanBreadcrumb;

    private List<SysAuthResourceDto> children;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }
    public LocalDateTime getEditTime() {
        return editTime;
    }

    public void setEditTime(LocalDateTime editTime) {
        this.editTime = editTime;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
    public String getPermissionCode() {
        return permissionCode;
    }

    public void setPermissionCode(String permissionCode) {
        this.permissionCode = permissionCode;
    }
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }
    public String getRedirect() {
        return redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }
    public String getHidden() {
        return hidden;
    }

    public void setHidden(String hidden) {
        if(hidden!=null){
            this.booleanHidden = hidden.equals("0") ? false : true;
        }
        this.hidden = hidden;
    }
    public String getAlwaysShow() {
        return alwaysShow;
    }

    public void setAlwaysShow(String alwaysShow) {
        if(alwaysShow!=null){
            this.booleanAlwaysShow= alwaysShow.equals("0") ? false : true;
        }
        this.alwaysShow = alwaysShow;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
    public String getNoCache() {
        return noCache;
    }

    public void setNoCache(String noCache) {
        if(noCache!=null){
            this.booleanNoCache= noCache.equals("0") ? false :true;
        }
        this.noCache = noCache;
    }
    public String getBreadcrumb() {
        return breadcrumb;
    }

    public void setBreadcrumb(String breadcrumb) {
        if(breadcrumb!=null){
            this.booleanBreadcrumb=breadcrumb.equals("0")?false:true;
        }
        this.breadcrumb = breadcrumb;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public List<SysAuthResourceDto> getChildren() {
        return children;
    }

    public void setChildren(List<SysAuthResourceDto> children) {
        this.children = children;
    }

    public boolean isHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public Integer getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(Integer isLeaf) {
        if(isLeaf !=null){
            this.hasChildren= isLeaf==1 ? false :true;
        }
        this.isLeaf = isLeaf;
    }

    public boolean isBooleanHidden() {
        return booleanHidden;
    }

    public void setBooleanHidden(boolean booleanHidden) {
        this.booleanHidden = booleanHidden;
    }

    public boolean isBooleanAlwaysShow() {
        return booleanAlwaysShow;
    }

    public void setBooleanAlwaysShow(boolean booleanAlwaysShow) {
        this.booleanAlwaysShow = booleanAlwaysShow;
    }

    public boolean isBooleanNoCache() {
        return booleanNoCache;
    }

    public void setBooleanNoCache(boolean booleanNoCache) {
        this.booleanNoCache = booleanNoCache;
    }

    public boolean isBooleanBreadcrumb() {
        return booleanBreadcrumb;
    }

    public void setBooleanBreadcrumb(boolean booleanBreadcrumb) {
        this.booleanBreadcrumb = booleanBreadcrumb;
    }

    @Override
    public String toString() {
        return "SysAuthResourceDto{" +
        "id=" + id +
        ", version=" + version +
        ", creater=" + creater +
        ", createTime=" + createTime +
        ", editor=" + editor +
        ", editTime=" + editTime +
        ", status=" + status +
        ", isDelete=" + isDelete +
        ", permissionCode=" + permissionCode +
        ", path=" + path +
        ", component=" + component +
        ", redirect=" + redirect +
        ", hidden=" + hidden +
        ", alwaysShow=" + alwaysShow +
        ", title=" + title +
        ", name=" + name +
        ", icon=" + icon +
        ", noCache=" + noCache +
        ", breadcrumb=" + breadcrumb +
        ", url=" + url +
        ", sort=" + sort +
        ", resourceType=" + resourceType +
        ", parentId=" + parentId +
        ", fullName=" + fullName +
        ", remark=" + remark +
        ", orgId=" + orgId +
        "}";
    }
}
